home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / KEYBOARD.SWG / 0062_Keyboard Port.pas < prev    next >
Pascal/Delphi Source File  |  1994-01-27  |  651b  |  24 lines

  1. {
  2. > Hello all, I am looking for a scancode for the tab key. I am desperate!
  3. > Please, Any code would be apreciated! Help! Netmail if you wish (1:241/99)
  4.  
  5. I saw Richard Brown wrote you a reply as a testing program, but it works for
  6. ASCII codes not SCAN codes so :
  7.  }
  8. Var
  9.   old : Byte;
  10. Begin
  11.   WriteLn ('Press any key to begin and ESCAPE to exit.');
  12.   ReadLn;
  13.   old:=$FF;
  14.   While Port[$60]<>1+$80 Do {Until ESCAPE is released, 1 is ESC scan-code}
  15.   Begin
  16.     If (old<>Port[$60]) And (Port[$60]<$80) Then
  17.     Begin
  18.       old:=Port[$60];
  19.       Writeln('Scan code ',old,' pressed - release code is ',old+$80);
  20.     End;
  21.   End;
  22. End.
  23.  
  24.